<template>
{{msg}}<br>
  {{age}}<br>
  <button @click="age++">age++</button>
</template>

<script lang="ts">
import {ref} from 'vue'
export default{
  setup(){//程序开始执行的函数
    let msg="Hello孙悟空"
    const age=ref(1)//响应式与@State一样
    return {
      msg,
      age
    }
  }
}
</script>

<style>

</style>
